<template>
<div>
    <div class="counter" @click="handleClick">{{num}}</div>
    <div>{{content}}</div>
</div>
</template>

<script>
export default {
    props: {
        content: {
            type: [String],
            required: true
        }
    },
    data() {
        return {
            num: 0
        }
    },
    methods: {
        handleClick() {
            this.num ++
            this.$emit('change', 1)
        }
    }
}

</script>
<style>
</style>